package com.javen.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.javen.dao.UserDao;
import com.javen.model.User;
import com.javen.service.UserService;
@Service
public class UserServicelmpl implements UserService{
	
	@Autowired//注入依赖
	private UserDao userDao;
	
	public boolean login(User user) {
		List<User>users=this.userDao.login(user);
		if(users.size()==1) {
			return true;
		}
		return false;
	}

	public int insert(User user) {
		// TODO Auto-generated method stub
		return this.userDao.insert(user);
	}
	
}
